# Contributor: ScrumpyJack <scrumpyjack@st.ilet.to>
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=termrec
pkgver=0.19
pkgrel=4
pkgdesc="Program for recording videos of terminal output"
url="https://angband.pl/termrec.html"
arch="all"
license="LGPL-2.0-or-later"
makedepends="
	autoconf
	automake
	bzip2-dev
	libtool
	zlib-dev
	"
checkdepends="xz-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/kilobyte/termrec/archive/v$pkgver.tar.gz
	disable-fuzz-test.patch
	"
options="libtool"

prepare() {
	default_prepare

	./autogen.sh
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-static
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
e2a99306bd519b1eb8bfd83c0aed8a5d1a97a33d2f8e1c3465a5c3ad4bbbc0fcbc443b038e84cd00fe2184bf5d1bdd5497e61e9f2f517a439ae070daef9e67d7  termrec-0.19.tar.gz
d8759cef963c9ab4ed3de4414d16216fc40046b5b33dfcc032ea754482f610259e093e409c5c14fdda503fe397e8758bfb99be46ff80958d63769938946ee182  disable-fuzz-test.patch
"
